$(document).ready(function() {
	$(".one").on({
		mouseover: function() {
			$('#image-q').attr("src", "/static/assets_zk/img/picture/xz-b.png")
		},
		mouseout: function() {
			$('#image-q').attr("src", "/static/assets_zk/img/icon-white.png")
		},
	});
	$(".two").on({
		mouseover: function() {
			$('#qie').attr("src", "/static/assets_zk/img/picture/zs-b.png")
		},
		mouseout: function() {
			$('#qie').attr("src", "/static/assets_zk/img/picture/zs-w.png")
		},
	});
	$(".three").on({
		mouseover: function() {
			$("#q2").attr("src", "/static/assets_zk/img/picture/hb-b.png")
		},
		mouseout: function() {
			$("#q2").attr("src", "/static/assets_zk/img/picture/hb-w.png")
		},
	});
	$(".four").on({
		mouseover: function() {
			$("#q3").attr("src", "/static/assets_zk/img/picture/jb-b.png")
		},
		mouseout: function() {
			$("#q3").attr("src", "/static/assets_zk/img/picture/jb-w.png")
		},
	});

	$(".five").on({
		mouseover: function() {
			$("#q4").attr("src", "/static/assets_zk/img/picture/r-b.png")
		},
		mouseout: function() {
			$("#q4").attr("src", "/static/assets_zk/img/picture/r-w.png")
		},
	});
	$(".six").on({
		mouseover: function() {
			$("#q5").attr("src", "/static/assets_zk/img/picture/lr-b.png")
		},
		mouseout: function() {
			$("#q5").attr("src", "/static/assets_zk/img/picture/lr-w.png")
		},
	});
	$(".seven").on({
		mouseover: function() {
			$("#q6").attr("src", "/static/assets_zk/img/picture/fz-b.png")
		},
		mouseout: function() {
			$("#q6").attr("src", "/static/assets_zk/img/picture/fz-w.png")
		},
	});
	$(".eight").on({
		mouseover: function() {
			$("#q7").attr("src", "/static/assets_zk/img/picture/jz-b.png")
		},
		mouseout: function() {
			$("#q7").attr("src", "/static/assets_zk/img/picture/jz-w.png")
		},
	});

	$(".listthree .ExamFastRemind .Tab li").click(function() {
		$(this).addClass("active").siblings().removeClass("active");
		var index = $(this).attr("mulu");
		$("#" + index).addClass("active").siblings().removeClass("active")
	})
});
$(function() {

	let count = $(".jsjs-icon-li-1").length;
	let index = 0;

	//切换头像
	$(".jsjs-icon-ul>li").click(function() {
		index = $(this).index();
		$(".jsjs-icon-ul>li").eq(index).addClass("jsjs-icon-li-1-after").siblings().removeClass(
			"jsjs-icon-li-1-after");
		localStorage.setItem("teacherIndex", index);
		$(".teacherCover>li").eq(index).removeClass("d-none").siblings().addClass("d-none")
	})
	$(".jsjs-icon-jiantou").click(function() {
		localStorage.getItem("teacherIndex");
		if (index <= 0) {
			index = count - 1;
		} else {
			index--;
		}
		$(".jsjs-icon-ul>li").eq(index).addClass("jsjs-icon-li-1-after").siblings().removeClass(
			"jsjs-icon-li-1-after");
		localStorage.removeItem("teacherIndex");
		localStorage.setItem("teacherIndex", index);
		$(".teacherCover>li").eq(index).removeClass("d-none").siblings().addClass("d-none");
	})
	$(".jsjs-icon-jiantou-you").click(function() {
		if (index >= count-1) {
			index = 0;
		} else {
			index++
		}
		$(".jsjs-icon-ul>li").eq(index).addClass("jsjs-icon-li-1-after").siblings().removeClass(
			"jsjs-icon-li-1-after");
		localStorage.removeItem("teacherIndex");
		localStorage.setItem("teacherIndex", index);
		$(".teacherCover>li").eq(index).removeClass("d-none").siblings().addClass("d-none");
	});
	//打开模态框
	$(".openMast,.course-box-btn-word,.right-bottom,.course-footer-btn>div,.addOpen,.advertisement,.EFRDetail>li,.zixun-left-center>a,.zixun-left-cente>a,.dagang>button").click(
		function() {
			$("#mast").css("display", "block");
		})
	//关闭模态框
	$(".mast-close").click(function() {
		$("#mast").css("display", "none");
	})
	//切换资讯
	$(".select").click(function() {
		let index = $(this).valueOf()
		console.log(index[0].selectedIndex, "----")
		index = index[0].selectedIndex;
		$(".news-box>ul").eq(index).removeClass("d-none").siblings().addClass("d-none");
	})
})
